/**
 *
 * Core of LighterGame
 *
 * @version 1.0
 */

// ---------------------------------------------------------

/**
 * DisplayObject,抽象类
 */
function DisplayObject(){
    //base
    this.id;
    this.name;
    //style
    this.absoluteX;
    this.absoluteY;
    this.x = 0;//relative x coordinate
    this.y = 0;//relative y coordinate
    this.alpha = 1;
    this.width = 0;
    this.height = 0;
    this.rotation;
    this.visible = true;
    //relationship
    this.parent = null;
    this.stage = null;
    //base event
    this.useHandCursor = false;
}
DisplayObject.prototype = {
    getStage: function(){
        return this.stage;
    },
    //Converts the (x, y) point from the Stage (global) coordinates to the display object's (local) coordinates.
    globalToLocal: function(x, y){
        //TODO
    },
    //Evaluates the display object to see if it overlaps or intersects with the object parameter.
    hitTestObject: function(object, usePixelCollision, tolerance){
        //TODO
    },
    //Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.
    hitTestPoint: function(x, y, usePixelCollision, tolerance){
        //TODO
    },
    //A handler for mouse events.
    onMouseEvent: function(event){
        //TODO
    },
    //[Abstract]The real rendering workhorse, it should be overridden by subclasses.
    render: function(context){},
    toString: function(){
        return this.name;
    }
}